evaluating a linear function